#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>
#include <QVector>

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    qDebug()<<"MainWindow5 input";
//    setWindowFlags(Qt::WindowCloseButtonHint );

    openInputPanel();
    tmpDialog=new TestDialog();
    hide();
    tmpDialog->show();

}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::openInputPanel()
{
    //    直接初始化静态成员变量
//    if(MainWindow::screenWidth == 320 && MainWindow::screenHeight == 240)
//        return;
    m_pFrmInput = frmInput::Instance();
    //以下方法打开中文输入法
    m_pFrmInput->Init("control", "black", 10, 10);
    //#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
    //connect(m_pFrmInput, SIGNAL(refresh_ui_sig()), this, SLOT(refresh_ui_slot()));
    connect(qApp, SIGNAL(focusChanged(QWidget *, QWidget *)),
            this, SLOT(focusChanged(QWidget *, QWidget *)));
    //#endif
    //以下方法打开数字键盘
    //frmNum::Instance()->Init("lightgray",10);
}

